#include "MusicRessource.hpp"

MusicRessource::MusicRessource(std::string filename) : AbstractRessource<sf::Music>(filename)
{
}

MusicRessource::~MusicRessource()
{
	UnloadRessource();
}

void MusicRessource::LoadRessource()
{
	if(m_loaded == false)
	{
		m_ressource = new sf::Music;
		m_loaded = m_ressource->OpenFromFile(m_filename);
	}
}

void MusicRessource::UnloadRessource()
{
	delete m_ressource;
	m_ressource = NULL;
	m_loaded = false;
}
